#include "EditorTexturePageView.h"
#include "EditorTexturePageViewModel.h"
#include "Widgets/ImageWidget.h"


void REditorTexturePageView::BindViewModel(TSharedObjectPtr<REditorPageViewModel> InViewModel)
{
    //Super::BindViewModel(InViewModel);
    ViewModel = InViewModel;
}

void REditorTexturePageView::CreateWidget(TSharedObjectPtr<RWidget> InParent)
{
    //create a image widget
    auto ImageWidget = NewWidget<RImageWidget>(InParent);
    ImageWidget->Image=ViewModel->GetTexture();
    ImageWidget->Anchor.Fill(InParent);
}
